import {
    createBrowserRouter,
} from "react-router-dom";
import {userRoute,adminRoute} from "./authority"

import Register from "../pages/log/register/index"
import Login from "../pages/log/login/index"
import Layout from "../layout";

const router = createBrowserRouter([
    {
        path:"/",
        element:<Layout />,
        children:[
            ...userRoute,
            ...adminRoute
        ]
    },
    {
        path: "/login",
        element: <Login />
    },
    {
        path: "/register",
        element: <Register />
    },
]);

export {router,userRoute};